<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ page import="com.alibaba.fastjson.JSONArray" %>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.Util" %>
<%
    JSONObject jsonData = new JSONObject();
    try {
        RecordSet rs = new RecordSet();
        JSONArray jsonArray = new JSONArray();
        rs.executeQuery("select id,title,linkurl,flowversion from uf_mchrlcpzb where status=0");
        while (rs.next()){
            JSONObject datajson = new JSONObject();
            datajson.put("id",Util.null2String(rs.getString("id")));
            datajson.put("title",Util.null2String(rs.getString("title")));
            datajson.put("linkurl",Util.null2String(rs.getString("linkurl")));
            datajson.put("flowversion",Util.null2String(rs.getString("flowversion")));
            jsonArray.add(datajson);
        }
        jsonData.put("datas", jsonArray);
    } catch (Exception e) {
        e.printStackTrace();
    }
    out.print(jsonData.toJSONString());
%>